package com.leyou.privilege.client;

import com.leyou.privilege.dto.ApplicationDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by IntelliJ IDEA.
 *
 * @author: wangzibeng
 * Date: 2019/5/16 0016
 * Time: 12:42
 */

@FeignClient("privilege-server")
public interface ApplicationClient {

    /**
     * 查询应用信息
     *
     * @param id     id
     * @param secret 秘钥
     * @return DTO
     */
    @GetMapping("app/query")
    ApplicationDTO queryApplicationByIdAndSecret(@RequestParam("id") Long id, @RequestParam("secret") String secret);
}
